import request from '@/utils/request'

/**
 *登录
 * @param {*} data {password手机号，mobile密码}
 * @returns promise对象
 */
export function loginAPI(data) {
  return request({
    url: '/sys/login',
    method: 'POST',
    data
  })
}
// 获取用户信息=====================================
export function getUserMessageAPI() {
  return request({
    url: '/sys/profile',
    method: 'POST'
  })
}
// 获取用户头像
export const getUserPhotoAPI = (id) => {
  return request({
    url: `/sys/user/${id}`
  })
}
export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}

